﻿@namespace BlazorFluentUI
@inherits FluentUIComponentBase

<CommandButton key="@ItemKey"
                  ClassName=@($"ms-Pivot-link mediumFont{(ParentPivot?.Selected == this ? " is-selected" : "")}")
                  OnClick="SelectItem"
                  AriaLabel=@AriaLabel
                  role="tab"
                  aria-selected=@(ParentPivot?.Selected == this ? "true" : "false")
                  name="@HeaderText"
                  data-content="@dataContent">
    <span class="ms-Pivot-linkContent">
        @if (!string.IsNullOrWhiteSpace(IconName))
        {
            <span class="ms-Pivot-icon">
                <Icon IconName=@IconName IconSrc=@IconSrc />
            </span>
        }
        @if (!string.IsNullOrWhiteSpace(HeaderText))
        {
            <span class="ms-Pivot-text"> @HeaderText</span>
        }
        @if (!string.IsNullOrWhiteSpace(ItemCount))
        {
            <span class="ms-Pivot-count"> (@ItemCount)</span>
        }
    </span>
</CommandButton>
